Add Book to My BookshelfPurchase This Book Online

Chapter 11 - Hello Cisco!

Cisco & IP Addressing
Louis D. Rossi, Louis R. Rossi and Thomas Rossi
  Copyright © 1999 The McGraw-Hill Companies, Inc.

Chapter 11: Hello Cisco!
Overview
Now that we know how to calculate a subnet it is time to see how this address is configured on a Cisco router.
A basic understanding of the Cisco IOS and the Command Line Interface (CLI) is assumed.
There are two ways to enter the IP address on a interface.
Setup Dialog: To enter the setup dialog enter the command “setup” at the enable prompt.
Configuration Mode: To enter the configuration mode use the “configuration terminal” command.
All bolded lines in Figure 11.1 pertain to configuring an IP address.
tallahassee#setup
         --- System Configuration Dialog ---
At any point you may enter a question mark '?' for help.
Use ctrl-c to abort configuration dialog at any prompt.
Default settings are in square brackets '[]'.
Continue with configuration dialog? [yes/no]: y
First, would you like to see the current interface summary? [yes]: y
Interface    IP-Address  OK?  Method  Status             Protocol
BRI0         unassigned  YES  unset   administratively down  down
BRI0:1       unassigned  YES  unset   administratively down  down
BRI0:2       unassigned  YES  unset   administratively down  down
Serial0      150.20.0.2  YES  NVRAM   down                   down
Serial1      20.0.0.2    YES  NVRAM   down                   down
Serial2      175.20.0.2  YES  NVRAM   down                   down
Serial3      unassigned  YES  unset   administratively down  down
TokenRing0   unassigned  YES  unset   administratively down  down
Configuring global parameters:
  Enter host name [tallahassee]:
The enable secret is a one-way cryptographic secret used
instead of the enable password when it exists.
  Enter enable secret [<Use current secret>]:
The enable password is used when there is no enable secret
and when using older software and some boot images.
  Enter enable password []:
  Enter virtual terminal password []:
  Configure SNMP Network Management? [no]:
  Configure LAT? [yes]: n
  Configure AppleTalk? [no]:
  Configure DECnet? [no]:
  Configure IP? [yes]:
    Configure IGRP routing? [yes]:
      Your IGRP autonomous system number [100]:
  Configure CLNS? [no]:
  Configure IPX? [no]:
  Configure Vines? [no]:
  Configure XNS? [no]:
  Configure Apollo? [no]:
  Configure bridging? [no]:
  Enter ISDN BRI Switch Type [none]:
Configuring interface parameters:
Configuring interface BRI0:
  Is this interface in use? [no]:
Configuring interface Serial0:
  Is this interface in use? [yes]: y
  Configure IP on this interface? [yes]:
  Configure IP unnumbered on this interface? [no]:
    IP address for this interface [150.20.0.2]: 192.20.30.17
    Number of bits in subnet field [0]: 4
  Class C network is 192.20.30.0, 4 subnet bits; mask is /28
Configuring interface Serial1:
Is this interface in use? [yes]:
  Configure IP on this interface? [yes]:
  Configure IP unnumbered on this interface? [no]:
    IP address for this interface [20.0.0.2]: 192.20.30.33
    Number of bits in subnet field [4]:
    Class C network is 192.20.30.0, 4 subnet bits; mask is /28
Configuring interface Serial2:
  Is this interface in use? [yes]:
  Configure IP on this interface? [yes]:
  Configure IP unnumbered on this interface? [no]:
    IP address for this interface [175.20.0.2]: 192.20.30.49
    Number of bits in subnet field [4]:
    Class C network is 192.20.30.0, 4 subnet bits; mask is /28
Configuring interface Serial3:
  Is this interface in use? [no]: n
Configuring interface TokenRing0:
  Is this interface in use? [no]: n
The following configuration command script was created:
hostname tallahassee
enable secret 5 $1$009t$de1iCmnOqYh5Tqp.r./bV.
enable password sails
line vty 0 4
password sailing
no snmp-server
!
no appletalk routing
no decnet routing
ip routing
no clns routing
no ipx routing
no vines routing
no xns routing
no apollo routing
no bridge 1
isdn switch-type none
!
interface BRI0
shutdown
no ip address
!
interface Serial0
ip address 192.20.30.17 255.255.255.240
no mop enabled
!
interface Serial1
ip address 192.20.30.33 255.255.255.240
no mop enabled
!
interface Serial2
ip address 192.20.30.49 255.255.255.240
no mop enabled
!
interface Serial3
shutdown
no ip address
!
interface TokenRing0
shutdown
no ip address
!
router igrp 100
redistribute connected
network 192.20.30.0
!
end
Use this configuration? [yes/no]: y
Figure 11.1  The Setup Dialog
Figure 11.1 shows that serial interfaces 0, 1, and 2 were configured with addresses 192.20.30.17, 192.20.30.33, and 192.20.30.49 respectively. The same mask 255.255.255.240 was configured on all three interfaces. When using the setup dialog we configure the subnet bits; in this case we are using four bits to describe subnets, hence the 255.255.255.240 mask.
  Tip  When we answer yes, the setup dialog saves the configuration file to NVRAM.
The second way to configure an IP address is to use the configuration mode (Figure 11.2).
san-francisco#config t
Enter configuration commands, one per line.  End with CNTL/Z.
san-francisco(config)#int s0/0
san-francisco(config-if)#ip address 192.20.30.50 255.255.255.240
san-francisco(config-if)#int e0/0
san-francisco(config-if)#ip address 192.20.30.113 255.255.255.240
Figure 11.2  The Configuration Mode
Figure 11.2 illustrates the configuration of a 3600 router. A 3600 is called a modular router because cards can be inserted into slots. In such a router we identify the interface by slot/port. In the case of the serial interface, slot 0 and port 0 or interfaces 0/0. On a fixed configuration router there are no slots, so to identify an interface it would simply be int s0.
Notice that when we identify interfaces the prompt does not change; be careful always to be aware of the interface that is currently identified. When configuring several interfaces it is not that difficult to lose track of the current interface.
The “configuration mode” requires the network mask, NOT the number of subnet bits, as in the case of the “setup dialog.”
Addresses can be removed by using the “no form” of the command as shown in Figure 11.3.
san-francisco (config) #int s0/0
san-francisco (config-if) #no ip address 192.20.30.50
255.255.255.240
san-francisco (config-if) #int e0/0
san-francisco (config-if) #no ip address 192.20.30.113
255.255.255.240
Figure 11.3  Using the “no” command form
Use the “no form” of a command to remove any line of configuration.
While the setup dialog automatically saves the configuration to NVRAM, the configuration mode does not.
To save configuration changes to NVRAM, use the “copy run start” as shown in Figure 11.4.
san-francisco#copy run start
Building configuration...
[OK]
san-francisco#
Figure 11.4  Saving Configuration Changes to NVRAM
router_b>en
router_b#copy run tftp
Remote host[]? 132.10.1.2
Name of configuration file to write [router_b-confg]?
Write file router_b-confg on host 132.10.1.2? [confirm]
Building configuration...
[OK]
router_b#
Figure 11.5  Saving Configuration changes to a TFTP Server
As Figure 11.5 illustrates we will supply the router with the address of the TFTP server and the name of the file that will be used on the TFTP server. In this cast router_b-confg will be the file name; this means the default will be saved to the 132.10.1.2.
In my opinion the best way to save a configuration file, external to the router, is on a disk. This way in case we do lose the configuration of a router it is simply a case of copying and pasting the config back into the router. Use the “show run” command, block out the configuration lines and “edit-copy”. Open notepad then “edit-paste”. If the configuration file is lost at the console port of the router, get into configuration mode then “edit-paste to host”. Of course the above example assumes a Windows platform.

 


 
Books24x7.com, Inc © 2000 –  Feedback